﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>罗列对象的属性和值</title>
    <script type="text/javascript">
        function GetPros(obj){
            for(var pros in obj){
                alert(pros + "+" + obj[pros]);  // 显示所有的属性值
            }
        }
    </script>
</head>
<body>
<input id="Button1" type="button" value="获取属性" onclick="GetPros(this)"/>
</body>
</html>